﻿<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
<script type="text/javascript" src="../lib/html5.js"></script>
<script type="text/javascript" src="../lib/respond.min.js"></script>
<script type="text/javascript" src="../lib/PIE_IE678.js"></script>
<![endif]-->
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css" />
    <link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
    <!--[if IE 6]>
<script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
    <title>采收发货记录表</title>
</head>
<body>
    <div class="pd-5">
        <div class="row cl" id="findfdiv">
            <div class="formControls col-2">
                <span class="select-box">
                    <select class="select" size="1" name="finddatabranchid_dn" id="finddatabranchid">
                    </select></span>
            </div>
            <div class="formControls col-8">
                <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM'})" placeholder="时间" id="findtaskstarttime_times" name="findtaskstarttime_times" class="input-text Wdate" style="width: 120px;">
            </div>
            <div class="formControls col-2">
                <button onclick="hcrainpage()" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 查询</button>
            </div>
        </div>
         <div class="cl pd-5 bg-1 bk-gray mt-5">
            <span class="l">
                <button onclick="method5('hcvueapp')" class="btn btn-secondary  round" id="Button1" name=""><i class="Hui-iconfont">&#xe644;</i>导出</button></span>
            <span class="r">提示：采收发货记录表-月<strong>^_^</strong> </span>

        </div>
        <div id="hcvueapp">
            <div class="page-container">
                <!--    <p class="f-20 text-success">生产基地农事记录表 <span class="f-14">{{task.databranchname}}</span></p>
            <p>日   期： {{task.taskstarttime}}</p>
            <p>生产基地名称：始兴县盛丰生态农业科技有限公司</p>-->
                <table class="table table-border table-bordered table-bg"  border="1" bordercolor="#000000" cellspacing="0" cellpadding="2" style="border-collapse:collapse;">
                    <thead>

                        <tr class="text-c">
                            <th rowspan="2">分类</th>
                            <th rowspan="2">序号</th>
                            <th rowspan="2">品名</th>
                            <th rowspan="2">全价</th>
                            <th rowspan="2">规格</th>

                            <th rowspan="1" colspan="2">日需求上限</th>
                            <th rowspan="2">入库数KG</th>
                            <th rowspan="1" colspan="3">出成率</th>
                            <th rowspan="2" class="text-c" v-for="gg in allgginfo">{{gg.fv3}}</th>
                            <th rowspan="2">发货原料</th>
                            <th rowspan="2">总量</th>
                        </tr>
                        <tr class="text-c">

                            <th rowspan="1">KG数</th>
                            <th rowspan="1">包数</th>
                            <th rowspan="1">发货总包数</th>
                            <th rowspan="1">包数折合Kg</th>
                            <th rowspan="1">出成率%</th>
                        </tr>

                    </thead>
                    <tbody>
                        <tr class="text-c" v-for="(getsend,index) in dtgetset">
                            <td>{{getsend.spfl}}</td>
                            <td>{{ index+1 }}</td>
                            <td>{{getsend.spname}}</td>
                            <td> </td>
                            <td> </td>
                            <td></td>
                            <td> </td>
                            <td>{{getsend.inallcount}}</td>
                            <td>{{getsend.outbjallcount_sl}}</td>
                            <td>{{getsend.outbjallcount}}</td>
                            <td>{{getsend.ccl}}</td>
                            <td v-for="(gg,ggindex)  in allgginfo">
                                <div v-if="gg.hcggindex ==1">{{getsend.gg1}}</div>
                                <div v-if="gg.hcggindex ==2">{{getsend.gg2}}</div>
                                <div v-if="gg.hcggindex ==3">{{getsend.gg3}}</div>
                                <div v-if="gg.hcggindex ==4">{{getsend.gg4}}</div>
                                <div v-if="gg.hcggindex ==5">{{getsend.gg5}}</div>
                                <div v-if="gg.hcggindex ==6">{{getsend.gg6}}</div>
                                <div v-if="gg.hcggindex ==7">{{getsend.gg7}}</div>
                                <div v-if="gg.hcggindex ==8">{{getsend.gg8}}</div>
                            </td>
                            <td>{{getsend.ylcount}}</td>
                            <td>{{getsend.allcount}}</td>
                        </tr>
                        <tr class="text-c" v-for="(getsend,index) in sumdt" style="font-weight: bold">
                            <td></td>
                            <td></td>
                            <td>合计</td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td>{{getsend.inallcount}}</td>
                            <td>{{getsend.outbjallcount_sl}}</td>
                            <td>{{getsend.outbjallcount}}</td>
                            <td>{{getsend.ccl}}</td>
                            <td v-for="(gg,ggindex)  in allgginfo">
                                <div v-if="gg.hcggindex ==1">{{getsend.gg1}}</div>
                                <div v-if="gg.hcggindex ==2">{{getsend.gg2}}</div>
                                <div v-if="gg.hcggindex ==3">{{getsend.gg3}}</div>
                                <div v-if="gg.hcggindex ==4">{{getsend.gg4}}</div>
                                <div v-if="gg.hcggindex ==5">{{getsend.gg5}}</div>
                                <div v-if="gg.hcggindex ==6">{{getsend.gg6}}</div>
                                <div v-if="gg.hcggindex ==7">{{getsend.gg7}}</div>
                                <div v-if="gg.hcggindex ==8">{{getsend.gg8}}</div>
                            </td>
                            <td>{{getsend.ylcount}}</td>
                            <td>{{getsend.allcount}}</td>
                        </tr>
                        <tr class="text-c" style="font-weight: bold">
                            <th v-bind:colspan="intallcol">今日专车发货随车白胶筐 个    泡沫箱   个</th>
                        </tr>
                        <tr class="text-c" style="font-weight: bold">
                            <th v-bind:colspan="Math.floor(intallcol/2)">发货人签字：</th>
                            <th v-bind:colspan="intallcol-Math.floor(intallcol/2)">收货人签字：</th>
                        </tr>
                        <tr class="text-c" style="font-weight: bold;">
                            <td  v-bind:colspan="Math.floor(intallcol/3)" >发货日期：</td>
                            <td  v-bind:colspan="Math.floor(intallcol/3)">承运人：</td>
                            <td  v-bind:colspan="intallcol-Math.floor(intallcol/3)-Math.floor(intallcol/3)">收货日期：</td>
                        </tr>
                    </tbody>
                </table>

            </div>
        </div>

        <div class="mt-5 ml-20">

            <div class="mt-5 row">
                <div id="page1"></div>
            </div>

        </div>
    </div>

    <script type="text/javascript" src="../lib/layui/layui2.js"></script>
    <script type="text/javascript" src="../js/vue.min.js"></script>
    <script>
        var hcvueapp = new Vue({
            el: '#hcvueapp',
            data: {
                dtgetset: [],
                allgginfo: [], sumdt: [],
                intallcol: 13,
                task: {}, taskwork: [], dcwork: [], taskGet: []
            },
            methods: {

            }
        })
    </script>
    <script src="../hcjsui/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../lib/layui/layui.js"></script>
    <script type="text/javascript" src="../lib/layer/1.9.3/layer.js"></script>
    <script type="text/javascript" src="../lib/laypage/1.2/laypage.js"></script>
    <script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>
    <script src="../hcjsui/js/_Define.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/hcui.js"></script>
    <script type="text/javascript" src="../js/hcui_list.js"></script>

    <script type="text/javascript">
        hcui_ajaxasync = false;
        var uiform = null;
        var whereaddinfo = "";
        $("#findtaskstarttime_times").val((getDateByChange(new Date(), 24)).Format("yyyy-MM"));
        $(function () {
            spsetBaseNoBt("yw_baseinfo", "id", "yw_baseinfo as T", "*", "#tablelist", "sctaskoutstore", "生产任务管理", "sctaskoutstore");
            //基地
            hcdoselbyPost("BranchID as id,BranchName as name", "mrbranch", "type='本部'", "", "", "id", function (data) {
                SetSelectWithArrayIdName("#finddatabranchid", data); $("#finddatabranchid").val(HCUser.HCUorg);
            });
            layui.use(['form'], function () {
                uiform = layui.form();
                //人员下拉加载 
                hcdoselbyPost("empid  as id,concat(depname,'-',empname) as name,empname as username,mobile as  tel,depname as address", "view_user", "branchid='" + HCUser.HCUorg + "'", "", "", "id",
                    function (data) {
                        SetSelectWithArrayIdName("#inoutusernamesel", data);
                        uiform.render();
                    });
            });

            hcrainpage(1);
        });

        function hcrainpage(curr) {
            hcapiget("../api/Hcrain/GetWorkAllInfoByTaskId",
                {
                    "time": $("#findtaskstarttime_times").val(),
                    "type": "m",
                    "branchid": $("#finddatabranchid").val()
                }, function (data) {
                    var result = JSON.parse(data);
                    hcvueapp.dtgetset = result.dtgetset;
                    hcvueapp.allgginfo = result.allgginfo; hcvueapp.intallcol = (13 + hcvueapp.allgginfo.length);
                    hcvueapp.sumdt = result.sumdt;
                    //console.log(hcvueapp.dtgetset);
                    //console.log(hcvueapp.allgginfo);
                });
        };

        //重新加载-重载
        function findreolad(isback) {
            hcrainpage(1);
        }

        function getDateByChange(date, days) {
            if (days == undefined || days == '') {
                days = 1;
            }
            var date = new Date(date);
            date.setHours(date.getHours() - days);
            return date;

        }
    </script>
</body>
</html>
